﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PerfumeShopManagement.Model;

namespace PerfumeShopManagement.Controller
{
    public class ExportCheckController : AbstractBaseController
    {
        public override object GetObjectById(object id)
        {
            throw new NotImplementedException();
        }

        public override List<object> GetAllObjects()
        {
            var result = (from e in _context.ExportChecks
                          select e);
            if (result != null)
                return result.ToList<object>();

            return new List<object>();
        }

        public override List<object> GetObjectsByCriteria(object obj)
        {
            throw new NotImplementedException();
            //ExportCheck exportCheck = (ExportCheck)obj;

            //var exportChecksQuery = (from e in _context.ExportChecks
            //                       select e);

            //if (exportCheck.CategoryId != 0)
            //    exportChecksQuery = exportChecksQuery.Where(e => e.CategoryId.Equals(exportCheck.CategoryId));

            //if (!StringUtil.isEmptyOrBlank(exportCheck.CategoryName))
            //    exportChecksQuery = exportChecksQuery.Where(e => e.CategoryName.Contains(exportCheck.CategoryName));

            //if (exportChecksQuery != null)
            //    return exportChecksQuery.ToList<object>();

            //return new List<object>();
        }

        public override bool Save(object obj)
        {
            throw new NotImplementedException();
        }

        public override bool Delete(object obj)
        {
            throw new NotImplementedException();
        }

        public override bool DeleteById(object id)
        {
            throw new NotImplementedException();
        }
    }
}
